package cate.game.role.res.call.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.interceptor.anno.ShutUpWorldTree;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBHeroCall;
import cate.game.res.CostSelect;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "召唤执行 の 请求")
@OperationSetter(value = GDOperation.HERO_CALL_EXE, sub = "type")
@ShutUpWorldTree
public class CallExeReq implements MsgInput {

    @NoteField(value = "召唤类型")
    public int type;

    @NoteField(value = "召唤消耗")
    public CostSelect cs;

    @Override
    public MsgConfig conf() {
        return MsgIdBHeroCall.CALL_EXE_REQ;
    }

    @Override
    public void execute(GameBody game, ClientContext cc) {
        cc.getRole().getRes().callPO.call(type, cs);
    }
}
